 <?php
           include('conn.php');
            $qry1 = "SELECT * from csvtable ";
            $qry = mysql_query($qry1);
            $data1 = array();
          while($rows = mysql_fetch_array($qry))
        {
            $data1[] = array("Travel Date" => $rows['Bkng_Date'],
                "Passenger Name"=> $rows['PaxName'],                  
                "Basic" => $rows['Basic'],
                "Total" => $rows['Net_Payable'],
              	"Upload Result" => $rows['processed']  );
        }
      ;echo json_encode($data1);
            
    
             
// The request is a JSON request.
// We must read the input.
// $_POST or $_GET will not work!
        include('conn.php');
       session_start();
$qry1 = "SELECT * from csvtable";
$qry = mysql_query($qry1);
$data = array();

$data = file_get_contents("php://input");
 
$objData = json_decode($data);
 
// perform query or whatever you wish, sample:
 
$query = 'SELECT * FROM  csvtable WHERE PaxName="'. $objData->data .'"';

 // Static array for this demo
$values = array();
 
// Check if the keywords are in our array
if(in_array($objData->data, $values)) 
{
  echo 'I have found what you\'re looking for!';
}
else 
{
  echo 'Sorry, no match!';
}

 ?>  